@using ZLJ.Application.Share.TestTree
@using BXJG.Utils.Application.Share.GeneralTree
@using Microsoft.AspNetCore.Components.Sections

@inherits TreeCreateBaseComponent<TestTreeDto, TestTreeCreateDto>

<SectionContent SectionName=@($"{Master}-create-body")>
    <Form @ref="frm" ValidateOnChange="true" Model="createDto" LabelColSpan="5" WrapperColSpan="19" OnFinish="OnFinish" Loading="IsBusy">
        <FormItem>
            <Input @bind-Value="context.DisplayName" AllowClear="true" />
        </FormItem>
        <FormItem>
            <Input @bind-Value="context.Name"  AllowClear="true" />
        </FormItem>
        <FormItem>
            <AntDesign.InputNumber @bind-Value="context.Age"
/>
        </FormItem>
        <FormItem>
            <AntDesign.DatePicker @bind-Value="context.Birthday"  AllowClear="true"/>
        </FormItem>
        <FormItem>
            <Input @bind-Value="context.StringField1"  AllowClear="true" />
        </FormItem>
        <FormItem>
            <AntDesign.InputNumber @bind-Value="context.Status"
                                    Max="66"
/>
        </FormItem>
        <FormItem>
            <AntDesign.InputNumber @bind-Value="context.F2"
                                    Precision="3"
                                    Max="0.66m"
                                    Min="0.2m"
/>
        </FormItem>
        <FormItem Label="测试4">
            <Switch @bind-Checked="context.F3" />
        </FormItem>
    </Form>
</SectionContent>

<SectionContent SectionName=@($"{Master}-create-btns")>
    <Checkbox @bind-Checked="isSaveAndContinue">保存后继续新增</Checkbox>
    <Button OnClick="BtnResetClick" Icon="@IconType.Outline.Redo" Loading="isReseting" Disabled="IsBusy">重置</Button>
    <Button OnClick="BtnSaveClick" Icon="@IconType.Outline.Save" Loading="isSaving" Disabled="IsBusy" Type="@ButtonType.Primary" >保存</Button>
</SectionContent>